import ConfigParser
import sys


class Api_connect(object):  
    def __init__(self, file_path):
        global url_path,api_key,db_user,sec_Key
        cf = ConfigParser.ConfigParser()  
        cf.read(file_path)
        url_path = cf.get("api_config", "url")  
        api_key = cf.get("api_config", "apikey")  
        sec_Key = cf.get("api_config", "secKey")  
        #print db_host, db_port, db_user, db_pwd 
    def get_server(self):
        return url_path
    
    def get_api_key(self):
        return api_key
    
    def get_sec_Key(self):
        return sec_Key